package com.shanzmoo.db.module.product.domain.vo;

import com.shanzmoo.db.module.product.entity.ProductUnitEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("商品单位")
public class UnitSelectVO {

    @ApiModelProperty("商品单位id")
    private Integer id;

    @ApiModelProperty("商品单位名称")
    private String name;

    public static UnitSelectVO create(ProductUnitEntity productUnitEntity) {
        UnitSelectVO unitVO = new UnitSelectVO();
        unitVO.setId(productUnitEntity.getId());
        unitVO.setName(productUnitEntity.getName());

        return unitVO;
    }

}
